package com.turing.post.salesmanage.util;

import java.math.BigInteger;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.IdClass;
import javax.persistence.Table;

/**
 * 单位证件明细信息
 * 
 * @author zxppanda
 * 
 */
@SuppressWarnings("serial")
@Entity
@Table(name = "ORGANIZEINFDETAIL")
@IdClass(OrganizeInfDetail.class)
public class OrganizeInfDetail implements java.io.Serializable {
	/**
	 * 单位ID
	 */
	private BigInteger organizeId;
	/**
	 * 证件序号
	 */
	private BigInteger seqNo;
	/**
	 * 证件类型
	 */
	private BigInteger idTypeId;
	/**
	 * 证件号码
	 */
	private String idNo;
	/**
	 * 证件图片id
	 */
	private BigInteger IdImageId;
	/**
	 * 备注
	 */
	private String remark;

	public OrganizeInfDetail() {

	}

	@Id
	@Column(name = "ORGANIZEID")
	public BigInteger getOrganizeId() {
		return organizeId;
	}

	public void setOrganizeId(BigInteger organizeId) {
		this.organizeId = organizeId;
	}

	@Id
	@Column(name = "SEQNO")
	public BigInteger getSeqNo() {
		return seqNo;
	}

	public void setSeqNo(BigInteger seqNo) {
		this.seqNo = seqNo;
	}

	@Column(name = "IDTYPEID")
	public BigInteger getIdTypeId() {
		return idTypeId;
	}

	public void setIdTypeId(BigInteger idTypeId) {
		this.idTypeId = idTypeId;
	}

	@Column(name = "IDNO")
	public String getIdNo() {
		return idNo;
	}

	public void setIdNo(String idNo) {
		this.idNo = idNo;
	}

	@Column(name = "IDIMAGEID")
	public BigInteger getIdImageId() {
		return IdImageId;
	}

	public void setIdImageId(BigInteger idImageId) {
		IdImageId = idImageId;
	}

	@Column(name = "REMARK")
	public String getRemark() {
		return this.remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime
				* result
				+ ((this.getOrganizeId() == null) ? 0 : this.getOrganizeId()
						.hashCode());
		result = prime * result
				+ ((this.getSeqNo() == null) ? 0 : this.getSeqNo().hashCode());
		return result;
	}

	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		final OrganizeInfDetail other = (OrganizeInfDetail) obj;
		if (this.getOrganizeId() == null) {
			if (other.getOrganizeId() != null)
				return false;
		} else if (!this.getOrganizeId().equals(other.getOrganizeId()))
			return false;
		if (this.getSeqNo() == null) {
			if (other.getSeqNo() != null)
				return false;
		} else if (!this.getSeqNo().equals(other.getSeqNo()))
			return false;
		return true;
	}
}